﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Sales
{
  public  class ControlsHelper
    {
        /// <summary>
        /// 复选框 （容器中 单选）
        /// </summary>
        /// <param name="cb"></param>
        /// <param name="Controls"></param>
        public static void CheckGroup(CheckBox cb, Control.ControlCollection Controls)
        {
            foreach (Control c in Controls)
            {
                if (c is CheckBox)
                {
                    CheckBox newcb = (CheckBox)c;

                    if (cb.Checked)
                    {
                        if (newcb.Text != cb.Text)
                            newcb.Checked = false;
                    }
                }
            }

        }

    }
}
